package com.link2room.soundwave.entity;

import com.link2room.common.entity.BaseEntity;
import org.hibernate.annotations.DynamicInsert;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * @author sqj88
 * @date 2018/1/4 16:56
 */
@Entity
@Table(name = "l2r_pms_coupon")
@DynamicInsert
public class L2RPmsCoupon extends BaseEntity{
    private String l2RCouponType;
    private String l2RCouponTypeName;
    private String pmsCouponType;
    private String pmsCouponCode;
    private String pmsCouponName;

    @Basic
    @Column(name = "l2r_coupon_type", nullable = false, length = 32)
    public String getL2RCouponType() {
        return l2RCouponType;
    }

    public void setL2RCouponType(String l2RCouponType) {
        this.l2RCouponType = l2RCouponType;
    }

    @Basic
    @Column(name = "l2r_coupon_type_name", nullable = false, length = 32)
    public String getL2RCouponTypeName() {
        return l2RCouponTypeName;
    }

    public void setL2RCouponTypeName(String l2RCouponTypeName) {
        this.l2RCouponTypeName = l2RCouponTypeName;
    }

    @Basic
    @Column(name = "pms_coupon_code", nullable = false, length = 32)
    public String getPmsCouponCode() {
        return pmsCouponCode;
    }

    public void setPmsCouponCode(String pmsCouponCode) {
        this.pmsCouponCode = pmsCouponCode;
    }

    @Basic
    @Column(name = "pms_coupon_name", nullable = false, length = 32)
    public String getPmsCouponName() {
        return pmsCouponName;
    }

    public void setPmsCouponName(String pmsCouponName) {
        this.pmsCouponName = pmsCouponName;
    }

    @Basic
    @Column(name = "pms_coupon_type", nullable = false, length = 32)
    public String getPmsCouponType() {
        return pmsCouponType;
    }

    public void setPmsCouponType(String pmsCouponType) {
        this.pmsCouponType = pmsCouponType;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        L2RPmsCoupon that = (L2RPmsCoupon) o;

        if (l2RCouponType != null ? !l2RCouponType.equals(that.l2RCouponType) : that.l2RCouponType != null)
            return false;
        if (l2RCouponTypeName != null ? !l2RCouponTypeName.equals(that.l2RCouponTypeName) : that.l2RCouponTypeName != null)
            return false;
        if (pmsCouponCode != null ? !pmsCouponCode.equals(that.pmsCouponCode) : that.pmsCouponCode != null)
            return false;
        if (pmsCouponName != null ? !pmsCouponName.equals(that.pmsCouponName) : that.pmsCouponName != null)
            return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = l2RCouponType != null ? l2RCouponType.hashCode() : 0;
        result = 31 * result + (l2RCouponTypeName != null ? l2RCouponTypeName.hashCode() : 0);
        result = 31 * result + (pmsCouponCode != null ? pmsCouponCode.hashCode() : 0);
        result = 31 * result + (pmsCouponName != null ? pmsCouponName.hashCode() : 0);
        return result;
    }
}
